<a name="header">
    <div class="header">
        <div>
            <a href="index.html"><img class="logo" src="img/logo.png"></a>
            <div class="search">
                <input id="search_val" type="text" placeholder="请输入搜索关键字">
                <span class="serach_cl"><img src="img/search.png">搜索</span>
                <!--<span><img src="img/phoneIcon.png">APP</span>-->
            </div>
        </div>
        <div>
            <a href="index.html"><span>首页</span></a>
            <a href="news_list.html"><span>7x24快讯</span></a>
            <span class="arrow"></span>
        </div>
    </div>
</a>
<script>
    //搜索
    $(document).keyup(function(event) {
        if (event.keyCode == 13) {
            if($("#search_val").val()==""){
                alert("请输入要搜索的内容")
            }else {
                $(location).attr('href', 'search.html?keyword='+$("#search_val").val());
            }
        }
    })

    $(document).ready(function(){
        $("span.serach_cl").click(function(){
            if($("#search_val").val()==""){
                alert("请输入要搜索的内容")
            }else {
                $(location).attr('href', 'search.html?keyword='+$("#search_val").val());
            }
        });
    });
</script>